<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>积分平台</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" type="text/css" href="__INDEX__/mui/css/mui.min.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/iconfont.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/common.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/productAdd.css"/>
		<script src="__INDEX__/js/lib/font.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
	    <header class="mui-bar mui-bar-nav">
	        <a class="mui-icon mui-icon-left-nav mui-pull-left goindex"></a>
	        <h1 class="mui-title">产品添加</h1>
	    </header>
	    <div class="mui-content">
			<form id="forms" enctype="multipart/form-data">
			<div class="modular">
				<div class="mui-input-row">
			        <label>产品名称：</label>
			    	<input type="text" class="mui-input-clear" name="product_name" placeholder="请填写产品名称">
			    	<!--<span class="mui-icon "></span>-->
				</div>
			</div>
			<div class="modular">
				<div class="mui-input-row">
			        <label>兑换分数：</label>
			    	<input type="number" class="mui-input-clear" name="required_integral" placeholder="请填写兑换积分数量">
			    	<span class="mui-icon ">分</span>
				</div>
			</div>
			<div class="modular">
				<div class="mui-input-row">
			        <label>市场参考价：</label>
			    	<input type="number" class="mui-input-clear" name="market_value" placeholder="请填写市场参考价">
			    	<span class="mui-icon">元</span>
				</div>
			</div>
			<div class="addImg">
				<!--<a class="defaultImg" >-->
					<!--<label for='test1'>-->
						<!--<img src="__INDEX__/images/addImg.png"/>-->
					<!--</label>-->
					<!--<input class="xiangce" id="test1"  type="file" accept="image/*">-->
				<!--</a>-->
				<input type="file" name="picture">
			</div>
			</form>
	    </div>
	    <button class="btn mui-btn mui-btn-block">确定发送</button>
		<script src="__INDEX__/js/lib/zepto.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/mui/js/mui.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/mui/js/mui.view.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/layer_mobile/layer.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/common.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/productAdd.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/jquery.3.3.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/maowenke.js" type="text/javascript" charset="utf-8"></script>
	<script>
		$(".goindex").on('tap',function () {
			window.location.href = "{:url('index/shopping')}";
        });
		$(".btn").on('tap',function () {
            ajax($("#forms"),"{:url('add/products')}",function (data) {
                if(data.code==200){
                    mui.alert(data.msg);
                    setTimeout(function () {
						window.location.href="{:url('index/shopping')}";
                    },2000);
				}else {
                    mui.alert(data.msg);
				}
            })
        });
	</script>
	</body>
</html>
